package com.example.myproject.util;

import com.example.myproject.seriable.SeriableDemo;
import org.slf4j.Logger;

import java.util.*;

/**
 * Created by Administrator on 2018/1/10.
 */
public class Test {

    private static Logger logger = org.slf4j.LoggerFactory.getLogger(Test.class);
    private static void test(){
        String t = null;
        t.toCharArray();
    }

    public static void  testBoolean(Boolean flag){
        flag = true;
        System.out.println("mian,flag testBoolean :"+flag);
    }

    public static void main(String[] args) {
        int a = 2;
        Boolean ff = false;
        testBoolean(ff);
        System.out.println("mian,flag chuandi :"+ff);

        System.out.println(Long.valueOf(a));

        ArrayList<String> abb = new ArrayList<>();


        List<String> list = new LinkedList<>();
        list.add("222");

        abb = (ArrayList<String>) list;

        Map<String,String> map = new HashMap<>();
        map.put("aa",":1");
        list = (List<String>) map.values();
        System.out.println(list);

        String s = null;
        try{
            test();
        }catch (Exception e){
            logger.error("sdsd0",e);
        }



        SeriableDemo test = new SeriableDemo();
        test.setUserName("sds");
        FileUtil.writeObject("e:/test.data",test);



    }
}
